import time

from threading import Thread


def func(name):
    time.sleep(2)
    print(f'{name}子线程运行了!')


if __name__ == '__main__':
    # 单进程下的多线程
    for i in range(10):
        t = Thread(target=func, args=(f'{i}号',))
        t.start()
